package com.wms.core.token.login;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import org.apache.log4j.Logger;

public class SessionListener implements HttpSessionListener{
	
	private static final Logger logger = Logger.getLogger(SessionListener.class);
	
	
	public void sessionCreated(HttpSessionEvent event) {
		
		logger.debug("SessionListener session createding \t\t"+event.getSession().getId()+"\t\t"+event.getSession().getLastAccessedTime());
		
	}
	
	
	public void sessionDestroyed(HttpSessionEvent event){
		
		logger.debug("SessionListener session destoryeding ");
		
		TokenLogin.deleteToken(event.getSession().getId());
		
	}
	
	
	
	
}
